<?php

namespace App\Http\Middleware;

use Closure;
use DB;
class HomeLoginMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        $data=DB::table('config')->first();
        if($data->status == 0){
           return view('home.404_2');
        }
         return $next($request);
    }

   
}